package cn.edu.hqu.example.bj.experiment_2;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button bt_1=(Button)findViewById(R.id.bt_1);
        Button bt_2=(Button)findViewById(R.id.bt_2);
        Button bt_3=(Button)findViewById(R.id.bt_3);
        Button bt_4=(Button)findViewById(R.id.bt_4);
        Button bt_5=(Button)findViewById(R.id.bt_5);
        bt_1.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(MainActivity.this,LinerLayoutActivity.class);
                startActivity(i);
            }
        });
        bt_2.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(MainActivity.this,RelativeActivity.class);
                startActivity(i);
            }
        });
        bt_3.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(MainActivity.this,FrameLayoutActivity.class);
                startActivity(i);
            }
        });
        bt_4.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(MainActivity.this,TableLayoutActivity.class);
                startActivity(i);
            }
        });
        bt_5.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                Intent i = new Intent(MainActivity.this,GridLayoutActivity.class);
                startActivity(i);
            }
        });
    }
}
